(global.webpackJsonp = global.webpackJsonp || []).push([ [ "components/kp-video/video" ], {
    "13a9": function(e, t, i) {
        var o = i("99b0");
        i.n(o).a;
    },
    2366: function(e, t, i) {
        var o = i("4fae");
        i.n(o).a;
    },
    "4fae": function(e, t, i) {},
    "57fe": function(e, t, i) {
        i.d(t, "b", function() {
            return o;
        }), i.d(t, "c", function() {
            return n;
        }), i.d(t, "a", function() {});
        var o = function() {
            this.$createElement;
            this._self._c;
        }, n = [];
    },
    "99b0": function(e, t, i) {},
    a074: function(e, t, i) {
        i.r(t);
        var o = i("b572"), n = i.n(o);
        for (var s in o) "default" !== s && function(e) {
            i.d(t, e, function() {
                return o[e];
            });
        }(s);
        t.default = n.a;
    },
    b572: function(e, t, i) {
        (function(e) {
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var o = i("db8f"), n = i("a71e"), s = i("9b04"), a = i("4771"), r = (i("99f3"), 
            function(e) {
                e && e.__esModule;
            }(i("03b8")), i("26cb"));
            function d(e, t) {
                var i = Object.keys(e);
                if (Object.getOwnPropertySymbols) {
                    var o = Object.getOwnPropertySymbols(e);
                    t && (o = o.filter(function(t) {
                        return Object.getOwnPropertyDescriptor(e, t).enumerable;
                    })), i.push.apply(i, o);
                }
                return i;
            }
            function l(e, t, i) {
                return t in e ? Object.defineProperty(e, t, {
                    value: i,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : e[t] = i, e;
            }
            var u = {
                props: {
                    videoInfos: {
                        type: Object,
                        default: {}
                    }
                },
                watch: {
                    videoInfos: {
                        handler: function(e, t) {
                            this.videoInfos = e;
                        },
                        immediate: !0,
                        deep: !0
                    }
                },
                computed: function(e) {
                    for (var t = 1; t < arguments.length; t++) {
                        var i = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? d(Object(i), !0).forEach(function(t) {
                            l(e, t, i[t]);
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(i)) : d(Object(i)).forEach(function(t) {
                            Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(i, t));
                        });
                    }
                    return e;
                }({}, (0, r.mapGetters)([ "mainColor", "isIphone" ])),
                data: function() {
                    return {
                        cache: "{{false}}",
                        current: 0,
                        src: "",
                        initialTime: 0,
                        videoContext: "",
                        isFullScree: "",
                        fullScreenFlag: !0,
                        currtime: "00:00",
                        druationTime: "00:00",
                        bool: !1,
                        sliderValue: 0,
                        sliderValueFull: 0,
                        updateState: !1,
                        controls: !1,
                        fullscreen: !1,
                        play: !1,
                        palyFlag: !0,
                        value: 0,
                        duration: 100,
                        isFull: !0,
                        items: [ {
                            id: 1,
                            name: "1.5X"
                        }, {
                            id: 5,
                            name: "1.25X"
                        }, {
                            id: 2,
                            name: "1.0X"
                        }, {
                            id: 3,
                            name: "0.8X"
                        }, {
                            id: 4,
                            name: "0.5X"
                        } ],
                        playy: !1,
                        full: "",
                        info: {
                            width: "100%",
                            height: "100%"
                        },
                        speedText: "1.0X",
                        sp: !1,
                        isControlShow: !0,
                        videoDuration: "",
                        videoCurrtime: 0,
                        user_id: "",
                        startTime: "",
                        endTime: "",
                        k: "",
                        endSid: "",
                        isEnd: "",
                        isHour: !1,
                        isWeXinPc: !1,
                        widthPc: "",
                        timeout: "",
                        isLoad: !1,
                        timeIsload: "",
                        inHeight: 0,
                        inWidth: 0,
                        isShu: !1,
                        timeIsloads: "",
                        marqueeSpeedBottom: 70,
                        marqueeSpeedTop: 50
                    };
                },
                mounted: function() {
                    var t = this;
                    t.$nextTick(function() {
                        t.videoContext = e.createVideoContext("myVideo", this);
                    }), this.marqueeSpeedBottom = 10 * this.videoInfos.marquee.marqueeSpeedBottom, this.marqueeSpeedTop = 10 * this.videoInfos.marquee.marqueeSpeedTop;
                },
                onReady: function() {},
                onUnload: function() {
                    clearTimeout(this.timeout);
                },
                methods: {
                    waiting: function() {
                        this.isLoad = !0;
                    },
                    start: function(e) {},
                    loadedmetadata: function(t) {
                        if (this.inHeight = t.detail.height, this.inWidth = t.detail.width, !this.isFull) {
                            var i = e.getSystemInfoSync();
                            this.info.width = this.inHeight > this.inWidth ? "100vw" : "100vh", this.info.height = this.inHeight > this.inWidth ? "100vh" : "100vw", 
                            i.isShu = this.inHeight > this.inWidth, this.isShu = i.isShu, this.$emit("openFull", i, 2);
                        }
                    },
                    sendDanMu: function() {
                        this.videoContext.sendDanmu({
                            text: "防伪视频",
                            color: this.getRandomColor()
                        });
                    },
                    getRandomColor: function() {
                        for (var e = [], t = 0; t < 3; ++t) {
                            var i = Math.floor(256 * Math.random()).toString(16);
                            i = 1 == i.length ? "0" + i : i, e.push(i);
                        }
                        return "#" + e.join("");
                    },
                    playStar: function() {
                        this.startTime = new Date().getTime();
                    },
                    pauseVideo: function() {
                        var e = this;
                        if (e.isEnd == e.startTime) return !1;
                        e.isEnd = e.startTime, parseInt(this.videoDuration) - parseInt(this.videoCurrtime) < 2 ? this.palyFlag = !0 : 1 == this.palyFlag && e.stopPlays(0);
                    },
                    endVideo: function() {
                        console.log("9999", this.videoInfos.index), this.endSid = this.videoInfos.sid, this.stopPlays(1, this.endSid), 
                        this.$emit("endVideo", this.videoInfos.index);
                    },
                    errorVideo: function(t) {
                        this.stopPlays(0), e.showModal({
                            confirmText: "确定",
                            showCancel: !1,
                            title: "温馨提示",
                            content: t.detail.errMsg,
                            success: function(e) {}
                        });
                    },
                    stopPlays: function(e, t, i, r) {
                        var d = this;
                        (0, a.getStorageSync)("userInfo").then(function(a) {
                            var l = JSON.parse(a.data);
                            if (!(0, n.isEmpty)(l.id)) {
                                d.user_id = a.id;
                                var u = {
                                    sid: (0, n.isEmpty)(t) ? d.videoInfos.sid : t,
                                    course_id: d.videoInfos.course_id,
                                    end_second: parseInt(d.videoCurrtime),
                                    is_complete: e,
                                    duration: parseInt((0, o.timeDiff)(d.startTime)) > 24e3 ? 0 : parseInt((0, o.timeDiff)(d.startTime)),
                                    user_id: l.id,
                                    isLoading: !1
                                };
                                (0, s.stopPlay)(u).then(function(e) {}), (0, n.isEmpty)(t) || 1 == e || d.$emit("swichVideo", i, r);
                            }
                        }, function(e) {});
                    },
                    playVideo: function() {
                        var t = this;
                        t.palyFlag = !t.palyFlag, t.$nextTick(function() {
                            if (t.videoContext ? (t.videoContext.play(), t.palyFlag = !1) : (t.videoContext = e.createVideoContext("myVideo", this), 
                            t.videoContext.play()), 0 != t.videoInfos.code && parseInt(t.videoInfos.seek) > 0 && parseInt(t.videoInfos.second) - parseInt(t.videoInfos.seek) > 2) {
                                var i = parseInt(t.videoInfos.seek) / parseInt(t.videoInfos.second) * 100, n = parseInt(t.videoInfos.seek);
                                t.videoContext.seek(n), t.sliderValue = i, t.updateState = !0, t.currtime = (0, 
                                o.formatSeconds)(parseInt(t.videoInfos.seek));
                            } else t.videoContext.seek(0);
                        }), t.sp = !1, t.missControl();
                    },
                    exchangeSpeed: function(e) {
                        var t = this;
                        switch (e.id) {
                          case 1:
                            t.videoPlayBackRate(1.5), t.speedText = "1.5X";
                            break;

                          case 2:
                            t.videoPlayBackRate(1), t.speedText = "1.0X";
                            break;

                          case 3:
                            t.videoPlayBackRate(.8), t.speedText = "0.8X";
                            break;

                          case 4:
                            t.videoPlayBackRate(.5), t.speedText = "0.5X";
                            break;

                          case 5:
                            t.videoPlayBackRate(1.25), t.speedText = "1.25X";
                        }
                    },
                    fullscreenchange: function(e) {
                        this.controls = 1 == e.detail.fullScreen, 2 == this.videoInfos.screen_style && (this.isFull = 1 != e.detail.fullScreen), 
                        0 == e.detail.fullScreen && this.$emit("backFull");
                    },
                    open: function() {
                        if (1 == this.videoInfos.screen_style) {
                            var t = e.getSystemInfoSync();
                            this.isFull = !this.isFull, this.isFull ? (this.info.width = "", this.info.height = "", 
                            t.isShu = !1) : (this.info.width = this.inHeight > this.inWidth ? "100vw" : "100vh", 
                            this.info.height = this.inHeight > this.inWidth ? "100vh" : "100vw", t.isShu = this.inHeight > this.inWidth), 
                            this.isShu = t.isShu, this.fullScreenFlag = !this.fullScreenFlag, this.$emit("openFull", t, 1);
                        } else 2 == this.videoInfos.screen_style && (this.controls = !0, this.inHeight > this.inWidth ? this.videoContext.requestFullScreen({
                            direction: 0
                        }) : this.videoContext.requestFullScreen({
                            direction: 90
                        }));
                    },
                    getElementHeight: function(t) {
                        setTimeout(function() {
                            e.selectorQuery.select(t);
                        }, 100);
                    },
                    videoPlayBackRate: function(e) {
                        this.videoContext.playbackRate(e);
                    },
                    change: function(e) {},
                    clk: function() {
                        (0, n.isEmpty)(this.timeout) || clearTimeout(this.timeout), this.isControlShow = !this.isControlShow, 
                        this.missControl();
                    },
                    missControl: function() {
                        var e = this;
                        this.isControlShow && (e.timeout = setTimeout(function() {
                            e.isControlShow = !1, clearTimeout(e.timeout);
                        }, 4e3));
                    },
                    progresss: function(e) {},
                    videoAllscreen: function(e) {
                        this.fullScreenFlag = !this.fullScreenFlag;
                    },
                    videoOpreation: function() {
                        var e = this;
                        return 0 == e.videoInfos.code && 1 == e.videoInfos.is_try && 0 != e.videoInfos.try_time && parseInt(e.videoCurrtime) >= parseInt(e.videoInfos.try_time) || 0 == e.videoInfos.code && 1 == e.videoInfos.is_try && 0 == e.videoInfos.try_time && parseInt(e.videoCurrtime) >= parseInt(e.videoInfos.second) ? (e.$toast("试看已结束", "none"), 
                        e.pause(), !1) : (JSON.stringify(e.palyFlag), this.palyFlag ? this.videoContext.play() : this.videoContext.pause(), 
                        this.palyFlag = !this.palyFlag, void this.$emit("palyFlag", this.palyFlag));
                    },
                    changeSpeed: function() {
                        if (!this.videoInfos.is_speed_play) return !1;
                        this.sp = !this.sp;
                    },
                    videoUpdate: function(e) {
                        var t = this, i = e.detail.currentTime / e.detail.duration * 100;
                        return this.currtime = (0, o.formatSeconds)(e.detail.currentTime), this.druationTime = (0, 
                        o.formatSeconds)(e.detail.duration), this.isHour = parseInt(e.detail.duration / 3600) >= 1, 
                        this.videoDuration = e.detail.duration, this.videoCurrtime = e.detail.currentTime, 
                        t.isLoad && (t.timeIsload = setTimeout(function() {
                            t.isLoad = !1, clearTimeout(t.timeIsload);
                        }, 0)), 0 == t.videoInfos.code && 1 == t.videoInfos.is_try && 0 != t.videoInfos.try_time && parseInt(e.detail.currentTime) > parseInt(t.videoInfos.try_time) || 0 == t.videoInfos.code && 1 == t.videoInfos.is_try && 0 == t.videoInfos.try_time && parseInt(e.detail.currentTime) >= parseInt(t.videoInfos.second) ? (t.timeIsloads = setTimeout(function() {
                            t.$toast("试看已结束", "none"), clearTimeout(t.timeIsloads);
                        }, 800), t.pause(), !1) : (t.sliderValue = i, void (1 == this.updateState && (this.sliderValueFull = i)));
                    },
                    swichMenu: function(e, t, i) {
                        var o = {
                            id: e.id,
                            currentTime: this.videoCurrtime,
                            sid: e.sid,
                            url: e.url,
                            end_second: e.end_second,
                            second: e.second,
                            try_time: e.try_time,
                            is_end_study: e.is_end_study,
                            is_try: e.is_try
                        };
                        this.stopPlays(0, i, o, t);
                    },
                    sliderChanging: function(e) {
                        this.updateState = !1;
                    },
                    sliderChangingFull: function(e) {
                        this.updateState = !1;
                    },
                    sliderChangeFull: function(e) {
                        this.sliderValueFull = e, this.updateState = !0;
                        var t = e / 100 * this.videoDuration;
                        this.videoContext.seek(t);
                    },
                    sliderChange: function(e) {
                        var t = this, i = this.videoDuration, n = e.detail.value / 100 * i;
                        if (0 == t.videoInfos.code && 1 == t.videoInfos.is_try && 0 != t.videoInfos.try_time && n > parseInt(t.videoInfos.try_time)) return t.videoContext.seek(parseInt(t.videoInfos.try_time)), 
                        t.sliderValue = parseInt(t.videoInfos.try_time), t.$toast("超出试看范围", "none"), t.pause(), 
                        t.timeIsload = setTimeout(function() {
                            t.isLoad = !1, clearTimeout(t.timeIsload);
                        }, 200), !1;
                        i && (this.videoContext.seek(n), this.sliderValue = e.detail.value, this.updateState = !0, 
                        this.currtime = parseInt(e.detail.currentTime) > 0 ? (0, o.formatSeconds)(e.detail.currentTime) : "00:00", 
                        this.videoCurrtime = e.detail.currentTime);
                    },
                    contrPlay: function() {
                        this.videoContext.play(), this.palyFlag = !1;
                    },
                    pause: function() {
                        this.videoContext.pause(), this.palyFlag = !0, this.$emit("palyFlag", !0);
                    }
                }
            };
            t.default = u;
        }).call(this, i("543d").default);
    },
    f177: function(e, t, i) {
        i.r(t);
        var o = i("57fe"), n = i("a074");
        for (var s in n) "default" !== s && function(e) {
            i.d(t, e, function() {
                return n[e];
            });
        }(s);
        i("2366"), i("13a9");
        var a = i("f0c5"), r = Object(a.a)(n.default, o.b, o.c, !1, null, "f528b30e", null, !1, o.a, void 0);
        t.default = r.exports;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "components/kp-video/video-create-component", {
    "components/kp-video/video-create-component": function(e, t, i) {
        i("543d").createComponent(i("f177"));
    }
}, [ [ "components/kp-video/video-create-component" ] ] ]);